﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Grid//记录网格信息
{
    public Vector2 Point;//坐标点
    public Vector2 wordPoint;//世界坐标
    public bool hasPlant = false;//是否有植物
    private Base_ currPlantBase;
    public Grid(Vector2 p,Vector2 word,bool has)
    {
        Point = p;
        wordPoint = word;
        hasPlant = has;
    }

    public Base_ CurrPlantBase { get => currPlantBase;
        set
        {
            currPlantBase = value;
            if (currPlantBase == null)
                hasPlant = false;
            else {
                hasPlant = true; 
            }
        }
    }
}
